﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Layout/SiteHead.master" AutoEventWireup="true" CodeBehind="MailLogsList.aspx.cs" Inherits="MailTool.Pages.MailLogsList" %>

<%@ Register Src="~/InfoControls/Pagination.ascx" TagName="Pagination" TagPrefix="suc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    模板列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function viewcontent(mailLogsId) {
            window.open("MailLogsView.aspx?mailLogsId=" + mailLogsId, "", "width=800,height=510,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");
        }
        $(function () {
            $("#<%=TxbStartDate.ClientID%>").datepicker({ dateFormat: 'yy/mm/dd', disabled: true });
            $("#<%=TxbEndDate.ClientID%>").datepicker({ dateFormat: 'yy/mm/dd', disabled: true });
        });
        function isdatenull() {
            var startdate = $("#<%=TxbStartDate.ClientID%>").val();
            var enddate = $("#<%=TxbEndDate.ClientID%>").val();
            if (startdate.length != 10 || enddate.length != 10) {
                alert("请选择正确的开始或结束时间！");
                return false;
            }
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SubMinTitle" runat="server">
    查看日志：按发送时间：
    <asp:TextBox ID="TxbStartDate" Columns="12" runat="server"></asp:TextBox>
    <span class="newfont06">至</span>
    <asp:TextBox ID="TxbEndDate" Columns="12" runat="server"></asp:TextBox>
    <asp:Button ID="BtnSearchRecord" OnClientClick="return isdatenull();" CssClass="right-button02"
        runat="server" OnClick="BtnSearchRecord_Click" Text="查 询" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <table id="subtree1" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="20">
                            <span class="newfont07">选择：<a href="#" class="right-font08" onclick="selectAll('ChkSelect');">全选</a>-<a
                                href="#" class="right-font08" onclick="unselectAll('ChkSelect');">反选</a></span>
                            <asp:Button ID="btnDeleteSelect" CssClass="right-button08" OnClientClick="return confirmDelete('ChkSelect',true);"
                                OnClick="BenDeleteSelect" runat="server" Text="删除所选邮件日志" />
                        </td>
                    </tr>
                    <tr>
                        <td height="40" class="font42">
                            <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646"
                                class="newfont03">
                                <tr class="CTitle">
                                    <td height="22" colspan="10" align="center" style="font-size: 16px">邮件日志列表
                                    </td>
                                </tr>
                                <tr align="center" bgcolor="#EEEEEE">
                                    <td align="center" height="30">选择
                                    </td>
                                    <td>邮件标题
                                    </td>
                                    <td>模板名称
                                    </td>
                                    <td>收件人
                                    </td>
                                    <td>发送状态
                                    </td>
                                    <td>发送时间
                                    </td>
                                    <td>查看
                                    </td>
                                </tr>
                                <asp:Repeater ID="rptNewsList" runat="server">
                                    <ItemTemplate>
                                        <tr class="listitems <%#(rptNewsList.Items.Count%2==0?"odd":"even")%>">
                                            <td align="center" height="20" class="item40">
                                                <asp:HiddenField ID="HiddenId" runat="server" Value='<%#DataBinder.Eval(Container.DataItem, "Id")%>' />
                                                <asp:CheckBox ID="ChkSelect" runat="server" />
                                            </td>
                                            <td nowrap="nowrap">
                                                <a href="#" onclick="viewcontent(<%#Eval("Id")%>)">
                                                    <%#Eval("MailTitle")%></a>
                                            </td>
                                            <td nowrap="nowrap">
                                                <%#Eval("Template.TemplateName")%>
                                            </td>
                                            <td nowrap="nowrap" class="item80">
                                                <%#Eval("AddressList.UserName")%>
                                            </td>
                                            <td nowrap="nowrap" class="item80">
                                                <%#Convert.ToBoolean(Eval("SendStatus"))==true?"成功":"失败"%>
                                            </td>
                                            <td nowrap="nowrap" class="item160">
                                                <%#Convert.ToDateTime(Eval("SendDate")).ToString("yyyy-MM-dd hh:mm")%>
                                            </td>
                                            <td class="item40">
                                                <a class="opt" href="#" onclick="viewcontent(<%#Eval("Id")%>)"><span class="icon-sprite icon-view"></span></a>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
                </table>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="6">
                            <img alt="" src="../Style/images/spacer.gif" width="1" height="1" />
                        </td>
                    </tr>
                    <tr>
                        <td height="33">
                            <suc:Pagination ID="Pagination" PageSize="12" runat="server"></suc:Pagination>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MainBody" runat="server">
</asp:Content>
